package com.ruoyi.job.task;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.teaching.api.RemoteDayilyService;
import org.mybatis.logging.Logger;
import org.mybatis.logging.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("sunTask")
public class SunTask {
        private static final Logger log = LoggerFactory.getLogger(SunTask.class);
        @Autowired
        private RemoteDayilyService remoteDailyTaskService;

        /**
         * 根据每个班的课表自动创建每日任务
         */
        public void createDailyTasks()
        {
            remoteDailyTaskService.createDailyTasks();
                System.out.println("创建每日任务");
//            log.debug("执行状态码：{}",r.getCode());
        }
        /**
         * 将每日任务设置为过期
         */
        public void overdueDailies()
        {
            R<Void> r = remoteDailyTaskService.overdueDailies();
//            log.debug("执行状态码：{}",r.getCode());
        }


}
